﻿<%@ Page Language="C#" MasterPageFile="~/Template/List.master" AutoEventWireup="true"
    CodeFile="MyApplyList.aspx.cs" Inherits="Gift_MyApplyList" Title="Untitled Page" %>

<%@ Register Src="~/Control/ListHeader.ascx" TagName="ListHeader" TagPrefix="wsc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">

    <script type="text/javascript">
        function getID(id) {
            document.getElementById('<%=tbSelectedID.ClientID %>').value = id;
        }

        function openEdit(id) {
            var width = 690;
            var height = 580;
            var url = "ApplyDetail.aspx?NoCache=" + Math.random();
            if (id != '')
                url = url + "&id=" + id;
            window.open(url, "newwindow", 'width=' + width + ',height=' + height + ',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,left=' + (screen.width - width) / 2 + ',top=' + (screen.height - height) / 2);
        }

        function searchClick() {
            //alert(window.event.keyCode);
            if (window.event.keyCode == 13) {
                document.getElementById("<%=btnSearch.ClientID %>").click(); return false;
            }
            return true;
        }

        function clearText(control, text) {
            if (control.value == text)
                control.innerText = "";
        }
        function insertText(control, text) {
            if (control.value == "")
                control.innerText = text;
        }
    </script>

    <script src="../My97DatePicker/WdatePicker.js" type="text/javascript"></script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="TitlePlaceHolder" runat="Server">
    我的申领
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ListToolBarPlaceHolder" runat="Server">
    <div style="display: none">
        <asp:Button ID="btnRefresh" runat="server" OnClick="btnRefresh_Click" />
        <asp:TextBox ID="tbSelectedID" runat="server"></asp:TextBox>
    </div>
    <table cellspacing="2" cellpadding="0" border="0" width="100%">
        <tr>
            <td class="ToolMenu" width="80">
                <div class="Normal" oldclass="Normal" onmouseover="OverChangeClass(this);" onmouseout="ReturnClass(this)"
                    onclick="openEdit('');">
                    <span>
                        <img src="<%=ResolveUrl("~/Images/Icon/Object/Dataset-add.gif")%>" alt="新建申领" /></span><span>新建申领</span>
                </div>
            </td>
            <td>
                <table cellspacing="0" cellpadding="0" border="0" class="TableSearch" width="100%">
                    <tr>
                        <td width="100%">
                            <asp:TextBox ID="tbSearch" runat="server" Style="width: 320px" CssClass="TextBox"></asp:TextBox>
                        </td>
                        <td width="10">
                            <asp:LinkButton ID="btnSearch" runat="server" OnClick="btnSearch_Click"><img alt="<%=SearchDefaultText %>" src="../Images/Icon/Icon-Search.png" align="absmiddle" style="cursor: pointer;" /></asp:LinkButton>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="AdvancedSearchPlaceHolder" runat="Server">
    <table cellspacing="3" cellpadding="0" border="0" width="100%">
        <tr>
            <td width="200" style="color: #15428b">
                申领原因
            </td>
            <td colspan="5">
                <asp:TextBox ID="tbTitle" runat="server" Style="width: 100%" class="Textbox01"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td width="200" style="color: #15428b">
                查询时间
            </td>
            <td>
                <asp:DropDownList ID="ddlTime" runat="server"  Width="80">
                </asp:DropDownList>
            </td>
            <td width="80" align="right" style="color: #15428b">
                时间
            </td>
            <td>
                <asp:TextBox ID="tbStartTime" runat="server" class="Textbox01" Style="width: 100px"
                    onfocus="WdatePicker();"></asp:TextBox>
            </td>
            <td width="60" align="center">
                -
            </td>
            <td>
                <asp:TextBox ID="tbEndTime" runat="server" class="Textbox01" Style="width: 100px"
                    onfocus="WdatePicker();"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td width="200" style="color: #15428b">
                申请状态
            </td>
            <td colspan="5" style="text-align:left;">
                <asp:CheckBox ID="cbSubmit" runat="server" Text="待审核" />
                <asp:CheckBox ID="cbPass" runat="server" Text="审核通过" />
                <asp:CheckBox ID="cbNotPass" runat="server" Text="审核未通过" />
                <asp:CheckBox ID="cbConfirm" runat="server" Text="已发货" />
                <div style="display: none;">
                    <asp:CheckBox ID="cbArrival" runat="server" Text="已到货" />
                   </div>
            </td>
        </tr>
        <tr>
            <td colspan="6" align="right">
                <asp:Button ID="btnAdvancedSearch" runat="server" CssClass="Button01" Text="查询" OnClientClick=""
                    OnClick="btnAdvancedSearch_Click" />
            </td>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="ListHeaderPlaceHolder" runat="Server">
    <table cellspacing="0" cellpadding="0" border="0" class="PageGridHeader" width="100%">
        <wsc:ListHeader ID="lhStatus" runat="server" Title="状态" Width="80" OrderColumn="Status"
            Align="center" />
        <wsc:ListHeader ID="lhPerson" runat="server" Title="申领人" Width="60" OrderColumn="ApplierDsName"
            Align="center" />
        <wsc:ListHeader ID="lhDepart" runat="server" Title="申领科室" Width="80" OrderColumn="ApplierDepartment"
            Align="center" />
        <wsc:ListHeader ID="lhSupplyTime" runat="server" Title="申领时间" Width="90" OrderColumn="ApplyTime"
            Align="center" />
        <wsc:ListHeader ID="lhTitle" runat="server" Title="申领原因" OrderColumn="ApplyTitle"
            Align="center" />
        <%-- <wsc:ListHeader ID="lhArrivalTime" runat="server" Title="到货时间" Width="90" OrderColumn="ArrivalTime"
            Align="center" /> --%>
        <%--        <wsc:ListHeader ID="lhOperate" runat="server" Title="操作"
            Align="center" />--%>
    </table>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="ListContentPlaceHolder" runat="Server">
    <table id="Table1" width="100%" border="0" cellspacing="0" cellpadding="0" class="MainInfolist">
        <asp:Repeater ID="rptApply" runat="server" OnItemDataBound="rptApply_ItemDataBound"
            OnItemCommand="rptApply_ItemCommand">
            <ItemTemplate>
                <tr id="TableRow_<%# Container.ItemIndex%>" style="cursor: hand; padding-top: 3px;"
                    class="Normal" oldclass="Normal" onmouseover="OverChangeClass(this);" onmouseout="ReturnClass(this)"
                    onclick="getID(this.id);ClickChangeClass(this);OpenDetail('<%#DataBinder.Eval(Container.DataItem,"Url") %>&Nocache=' + Math.random());">
                    <%--<td>
                        <asp:CheckBox ID="cbSelect" runat="server" />
                    </td>--%>
                    <td width="80" align="center">
                      <%# WebCommon.Cut(DataBinder.Eval(Container.DataItem, "Status"),10)%>
                    <div style=" display:none">
                        <img src="../images/<%# DataBinder.Eval(Container.DataItem, "Status") %>.png" title="<%# DataBinder.Eval(Container.DataItem, "Status") %>" />
                  
                  </div>
                  
                    </td>
                    <td width="60" align="center" title="<%# DataBinder.Eval(Container.DataItem, "ApplierDsName")%>">
                        <%# WebCommon.Cut(DataBinder.Eval(Container.DataItem, "ApplierDsName"),6)%>
                    </td>
                    <td width="80" align="center" title="<%# DataBinder.Eval(Container.DataItem, "ApplierDepartment")%>"
                        style="text-align: center;">
                        <%# WebCommon.Cut(DataBinder.Eval(Container.DataItem, "ApplierDepartment"),6)%>
                    </td>
                    <td width="90" align="center">
                        <%# DataBinder.Eval(Container.DataItem, "ApplyTime","{0:yyyy-MM-dd}")%>
                    </td>
                    <td align="left" title="<%# DataBinder.Eval(Container.DataItem, "ApplyTitle")%>">
                        <%# WebCommon.Cut(DataBinder.Eval(Container.DataItem, "ApplyTitle"),10)%>
                    </td>
                    <%--
                  
                    <td width="90" align="center">
                        <%# DataBinder.Eval(Container.DataItem, "ArrivalTime", "{0:yyyy-MM-dd}")%>
                    </td>--%>
                    <%--                    <td align="center">
                        <asp:Button ID="btnCancel" runat="server" Text="取消" CssClass="Button01" OnClientClick="return confirm('确认要取消订单么？')" CommandName="Cancel" CommandArgument='<%#Eval("ID") %>' />
                        
                    </td>--%>
                </tr>
            </ItemTemplate>
        </asp:Repeater>
    </table>
</asp:Content>
